home *** CD-ROM | disk | FTP | other *** search
- Include multi.inc
- Include model.inc
-
- ;==============================================================================
- ;
- ; CAS function 11h -- Get Queue Status
- ;
- ; Format:
- ; int CASGetQueueStatus (BYTE queue, QSTAT far *buffer)
- ; Input:
- ; pointer to queue status structure
- ; Output:
- ; Returns 0 if successful or negative error code,
- ; fills queue status structure.
- ;==============================================================================
-
- .CODE
- CASGetQueueStatus PROC arg1:BYTE, arg2:PTR WORD
-
- push es ; save registers
- push di
- push bx
- push cx
-
- mov ax,MUX ; load multiplex number
- mov ah,al ; move into ah
- mov al,11h ; CAS function 11
- mov dl,arg1 ; load queue
- int 2Fh
- cmp ax,0 ; call successful?
- jl ERR ; call failed
-
- IF @DataSize ; large and compact models
- les di,arg2 ; pointer to data block
- mov es:[di],ax ; number of changes
- mov es:[di+2],bx ; number of control files
- mov es:[di+4],cx ; number of received files
- ELSE
- mov di,arg2 ; small and medium model
- mov [di],ax ; number of changes
- mov [di+2],bx ; number of control files
- mov [di+4],cx ; number of received files
- ENDIF
- cmp ax,0
- jle ERR ; don't modify error code
- mov ax,0 ; return success value
-
- ERR:
- pop cx ; restore registers
- pop bx
- pop di
- pop es
- ret
- CASGetQueueStatus endp
-
- END
-